//
//  Utility.m
//  EcShop
//
//  Created by soft on 2017/11/1.
//  Copyright © 2017年 soft. All rights reserved.
//

#import "Utility.h"

@implementation Utility
+(void)showMsg:(NSString *)msg{
    UIView *window = [[UIApplication sharedApplication].delegate window];
    
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:window animated:YES];
    
    hud.mode = MBProgressHUDModeCustomView;
    hud.customView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"yes"]];
    hud.label.text = msg;
    [hud hideAnimated:YES afterDelay:2.0];
    
}

+(void)showAlert:(NSString *)msg{
    UIView *window = [[UIApplication sharedApplication].delegate window];
    
    MBProgressHUD *hud = [MBProgressHUD showHUDAddedTo:window animated:YES];
    
    hud.mode = MBProgressHUDModeCustomView;
    hud.customView = [[UIImageView alloc]initWithImage:[UIImage imageNamed:@"no"]];
    hud.label.text = msg;
    [hud hideAnimated:YES afterDelay:2.0];
    
}
@end
